import requests, re
def getManyPages(keyword):
    params = []
    for i in range(1):
        params.append({
            'tn': 'resultjson_com',
            'ipn': 'rj',
            'ct': 201326592,
            'is': '',
            'fp': 'result',
            'queryWord': keyword,
            'cl': 2,
            'lm': -1,
            'ie': 'utf-8',
            'oe': 'utf-8',
            'adpicid': '',
            'st': -1,
            'z': '',
            'ic': 0,
            'word': keyword,
            's': '',
            'se': '',
            'tab': '',
            'width': '',
            'height': '',
            'face': 0,
            'istype': 2,
            'qc': '',
            'nc': 1,
            'fr': '',
            'pn': i,
            'rn': 30,
            'gsm': '1e',
            '1488942260214': ''
        })
    head = {
        'Host': 'image.baidu.com',
        'Referer': 'http: // image.baidu.com / wisehomepage / feeds',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36'
    }
    urls = []
    for i in params:
        ctx = requests.get('https://image.baidu.com/search/acjson', params=i, headers=head).content
        ctx1 = requests.get('https://image.baidu.com/search/acjson', params=i, headers=head)
        urls = urls + re.findall('"thumbURL":"(.*?)"', ctx)
    #print urls
    return urls
getManyPages('happy')